home *** CD-ROM | disk | FTP | other *** search
/ Night Owl's Games 2 / Night Owl's Shareware (NOPV_GAMES 2) Games Disc II (Night Owl) (1994).iso / 005a / hacker10.zip / HACKER.TXT < prev    next >
Text File  |  1994-03-17  |  11KB  |  190 lines

  1.                                 Hacker 1.0
  2.                           by WadeSoft, March 1994
  3.  
  4.  
  5. Disclaimer
  6.  
  7. This program has been added to the World's collection of public domain utilites.
  8. It is a free utility, and therefore neglecting the cost of diskette(s), no price is to be
  9. entailed with its distribution. 
  10.  
  11. Purpose
  12.      
  13. This program was created as a programming aid: to help WadeSoft decipher
  14. various file formats, such as .WAV and .TGA files. It can be used for this purpose
  15. as well as another - to help gamers "cheat". As well as a programmers' best friend,
  16. this utility can be also be the gamers' most valued program.
  17.  
  18. Program Outline
  19.  
  20. Hacker was designed with four distinct goals in mind. These four functions, which
  21. are performed on either textual or binary (.exe) files, can be categorized in the
  22. following manner:
  23.  
  24.      a.   Numeric/character search.
  25.      b.   Numeric/character search and replace.
  26.      c.   Numeric/character modification.
  27.      d.   File comparison.
  28.  
  29. Numeric/Character Search Explained
  30.  
  31. This is probably the single most useful part of Hacker's functions in the eyes of a
  32. programmer. It allows the user to search an entire file (textual or binary) for a
  33. given byte, integer, word, long integer or sequence of characters. Upon finding an
  34. occurrence of the specified value, the program will display it's location inside the
  35. file. We used this function to understand the .TGA file format. We knew our image
  36. was 640 pixels wide and 480 long, so we searched for the "word" (see "Data Types
  37. Explained") "640" inside the file. It told us it's exact location. Upon acquiring this
  38. knowledge, our program was able to know the resolution of any image we wanted,
  39. not just this particular one. The point is that we can now take more complete
  40. advantage of the .TGA file format.   
  41.  
  42. Numeric/Character Search and Replace
  43.  
  44. When selection what one wants to search for in a file, the program asks if the user
  45. wants to do any replacing after the values have been located. If so, then the
  46. program asks what to replace the values with. Then it begins the search, and when
  47. any identical values are located, the program asks if the user wants the value at this
  48. particular location replaced. If yes is answered, the program replaces the located
  49. value with the desired one. This is useful for cheating in games. If one knew that
  50. he or she had $540 dollars in a game, they could search their save-game file for
  51. 540, and if it were found, it could be replaced with $10,000!
  52.  
  53. Numeric/Character Modification
  54.  
  55. When searching for a value, let us say $540 in a saved game, the program will
  56. display the location of its findings. Instead of doing a Search/Replace every time
  57. the user wanted to change his or her money in the game (and therefore knowing
  58. exactly how much money he/she had at the time), the user could just specify the
  59. location of the value to change, and change it to $20,000. The gamer would
  60. hopefully have written down the location inside the file where the money was
  61. stored.
  62.  
  63. File Comparison
  64.  
  65. Almost always, saved game files are of a constant length. This would indicate that
  66. game-related information (such as money) is always stored in the same location.
  67. File comparison is only useful for which are of the same length. The reason is that
  68. the program reports every byte which is different between the two specified files.
  69. If one were larger than the other, each addition byte would be reported, making for
  70. a huge list of meaningless differences. Let us say that in a role-playing game, we
  71. saved the game just prior to and just after having changed our sword for an axe.
  72. If a file comparison were performed between the two saved-game files, these
  73. changed would be revealed. The user would then know to change byte 45 to value
  74. 32 if he wants an axe or value 31 if he wants a sword. What happens when we
  75. change it to 56? A halberd perhaps? After having made a comparison, it is best to
  76. use the "File Modification" tactic to alter these values. Note that it is useful to
  77. create lists of weapons or spells along with their associated byte values and
  78. locations. Include your list and this program together in a package, and distribute
  79. it them!
  80.  
  81. Data Types Explained (simplified)
  82.  
  83. A small amount of "programming" knowledge is required if one wants to use this
  84. program. The reason is simple. Because this software functions with ALL types of
  85. files and games, no preset locations or file definitions are known to the utility. In
  86. other words, the user must specify the type of data he is searching for. Data is
  87. stored in several different manners, and below is posted a listing of the different
  88. data types this program supports (which is virtually all of them). If you are
  89. unfamiliar with programming, or more specifically with data storage, here is a brief
  90. explanation. 
  91.  
  92. A file is composed of a certain number of bytes. Let us take a 64 kilobyte file as
  93. an example. 64k represents 64,000 bytes of information (approximately, since in
  94. computerese kilo stands for 1024, which yields 65,536 bytes). A number between
  95. the range of 0 and 255 (256 possible numbers) requires 1 byte of storage space. If
  96. in your saved game, the value you are searching for cannot exceed 255, then it is
  97. likely to have been stored as a byte value. If your numbers get larger than this (say
  98. money, of which you have $4,000), then it has not been saved as a byte value. It
  99. has probably been saved as something larger, say a word. A word is composed of
  100. two bytes placed side-by-side. These can hold numbers as large as 65,536. If you
  101. think about it this makes sense, since 256 (largest value for a byte-value) multiplied
  102. by 256 gives you 65,536. Though bytes are usually considered to be the smallest
  103. units, they are not. No file can be smaller than 1 byte, but one byte is actually
  104. composed of 8 bits. Here is a description of how the number 341 is stored in
  105. memory. Note that this is larger than 255, so must be stored as a word. 
  106.  
  107.  
  108. 0    0    0    0    0    0    0    1    0    1    0    1    0    1    0    1
  109. 2^15 2^14 2^13 2^12 2^11 2^10 2^9  2^8  2^7  2^6  2^5  2^4  2^3  2^2  2^1  2^0
  110.  
  111. Please note than "2^15" Indicates 2 to the power of 15. If one wants to change this
  112. base-2 number to base-10, one needs to find the "1's" in the upper row, and for
  113. each of these, add the number represented below it. 341 would be 2^8 + 2^6 + 2^4
  114. + 2^2 + 2^0 = 341. Notice that there are 16 elements, or in other words, 16 bits.
  115. This means two bytes side-by-side as was described above. This was called a
  116. "word". We said that 65,536 was the largest number which could be represented
  117. by a word. Is this true? Assume a "1" for each of the cells above, and you should
  118. get 65,535. Why are we missing 1? Because "0" is a number, and thus, we can
  119. store 65,536 numbers, of which the largest is 65,535.
  120.  
  121.  
  122. Data Type      Stored Bytes   Stored Bits    Smallest  Biggest
  123. Byte           1              8              0         255
  124. Character      1              8              ASCII #0  ASCII #255
  125. Word           2              16             0         65,535
  126. Integer        2              16             -32767    32767
  127. Long Integer   4              32             -2.15bil  2.15bil
  128.  
  129. Using the Program
  130.  
  131. Throughout this documentation there have been several explanations and examples,
  132. but none formalized. Here we will present to you one formal example of cheating.
  133. Origin's Privateer is quite a popular game now, and so we thought we'd show you
  134. how to "help" you along in the game. Load up a saved game and check to see how
  135. much money you have. Let us say you have $5200 credits exactly. Quit the game
  136. and load up Hacker. It is best to place hacker in your path statement so you can
  137. access it from anywhere, though this is not required. From the main menu, choose
  138. option 4, which is "long int". We know we can have a lot of money, so we assume
  139. the information is stored as a long integer (see table above). The program will then
  140. prompt you for the name of the file. Enter it. They it will ask you if you want to
  141. search the file. Say yes here. If you knew the location of the byte to modify, then
  142. you would say no here. The utility will then ask you what you want to search for.
  143. Enter $5200 here. The program will then as you if you want to replace any of the
  144. values you find. Enter yes if you want to actually change your money. It will then
  145. ask you what your desired value is. Enter 20,000. The program will then begin to
  146. scan the file. If any matches were found, the program will tell you where it found
  147. the occurrence. It will then ask you if you want to replace this value with the
  148. desired quantitiy of cash you entered previously. If yes, then the change will be
  149. made. Hit "y". You have now made some good money without much effort!
  150.  
  151. Generally, all information related to your character rather than to the map of the
  152. game is stored at the beginning of the file. If a second or third match is made for
  153. $5,200, it is probably fluke. It is generally best to accept only the first occurrence,
  154. and to ignore the following ones. 
  155.  
  156. Contacting WadeSoft
  157.  
  158. WadeSoft is at the moment a small shareware-oriented company dedicated to
  159. releasing useful programs to the public domain. In other words, the little utilities
  160. we write to help us write our larger programs are released as public, whereas we
  161. ask for some money for the larger ones!
  162.  
  163. WadeSoft runs a public/private bulletin board called The Spinning Disk at the
  164. following number: 416-447-9233 (416-447-WADE). If private access is desired
  165. (access to files and the other telephone lines) then the nominal fee of $15.00 is
  166. asked. You do not need to register ($15.00) with the Spinning Disk to obtain
  167. WadeSoft technical help. To do so, please leave a comment to the System Operator
  168. detailing your problem(s). That is option "C" at the main menu. 
  169.  
  170. Registration
  171.  
  172. Registration of any WadeSoft product is mearly $10.00 US or $12.50 Canadian.
  173. Registration simply means that you receive a diskette in the mail, along with nicely
  174. printed and formatted documentation. Please indicate your mailing address,
  175. telephone number and diskette type in the envelope. By sending $25.00 ($30.00
  176. CND), you will receive a copy of ALL our programs, along with their respective
  177. documentations. In order to minimize our costs however, all programs will be
  178. contained on one or two diskettes, rather than having a each program contained
  179. individually.
  180.  
  181. Mailing Address
  182.  
  183. Please mail cheques to the following address, and make cheques payable to
  184. "Gregory Wade".
  185.  
  186. Gregory Wade
  187. 26 Farrington Drive
  188. North York, On, Canada
  189. M2L 2B6
  190.